home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Utilities / Unix / skey / src / skey.h < prev    next >
C/C++ Source or Header  |  1993-11-08  |  1KB  |  62 lines

  1. /*
  2.  * S/KEY v1.1b (skey.h)
  3.  *
  4.  * Authors:
  5.  *          Neil M. Haller <nmh@thumper.bellcore.com>
  6.  *          Philip R. Karn <karn@chicago.qualcomm.com>
  7.  *          John S. Walden <jsw@thumper.bellcore.com>
  8.  *
  9.  * Modifications:
  10.  *          Scott Chasin <chasin@crimelab.com>
  11.  *
  12.  * Main client header
  13.  */
  14.  
  15. #if    defined(__TURBOC__) || defined(__STDC__) || defined(LATTICE)
  16. #define    ANSIPROTO    1
  17. #endif
  18.  
  19. #ifndef    __ARGS
  20. #ifdef    ANSIPROTO
  21. #define    __ARGS(x)    x
  22. #else
  23. #define    __ARGS(x)    ()
  24. #endif
  25. #endif
  26.  
  27. #ifdef SOLARIS
  28. #define setpriority(x,y,z)      z
  29. #endif
  30.  
  31. /* Server-side data structure for reading keys file during login */
  32. struct skey
  33. {
  34.   FILE *keyfile;
  35.   char buf[256];
  36.   char *logname;
  37.   int n;
  38.   char *seed;
  39.   char *val;
  40.   long recstart;        /* needed so reread of buffer is efficient */
  41.  
  42.  
  43. };
  44.  
  45. /* Client-side structure for scanning data stream for challenge */
  46. struct mc
  47. {
  48.   char buf[256];
  49.   int skip;
  50.   int cnt;
  51. };
  52.  
  53. void f __ARGS ((char *x));
  54. int keycrunch __ARGS ((char *result, char *seed, char *passwd));
  55. char *btoe __ARGS ((char *engout, char *c));
  56. char *put8 __ARGS ((char *out, char *s));
  57. int etob __ARGS ((char *out, char *e));
  58. void rip __ARGS ((char *buf));
  59. int skeychallenge __ARGS ((struct skey * mp, char *name, char *ss));
  60. int skeylookup __ARGS ((struct skey * mp, char *name));
  61. int skeyverify __ARGS ((struct skey * mp, char *response));
  62.